package com.molichuxing.services.property;

/**
 * 
 * @author liyg 驾驶证数据来源枚举类
 *
 */
public enum DrivingLicenseDataSourceEnum {

	/**
	 * orc识别（人工）
	 */
	LABOUR_JUDGE(1, "人工"),
	
	/**
	 * 接口
	 */
	INTERFACE_JUDGE(2, "接口");

	int value;
	String name;

	DrivingLicenseDataSourceEnum(int value, String name) {
		this.value = value;
		this.name = name;
	}

	public int getValue() {
		return value;
	}

	public String getName() {
		return name;
	}


	/**
	 * 通过value获取枚举的name
	 * 
	 * @param value
	 * @return
	 */
	public static String getName(int value) {
		DrivingLicenseDataSourceEnum enumerate = getEnum(value);
		return enumerate == null ? null : enumerate.getName();
	}

	/**
	 * 通过value获取枚举
	 * 
	 * @param value
	 * @return
	 */
	public static DrivingLicenseDataSourceEnum getEnum(int value) {
		for (DrivingLicenseDataSourceEnum enumerate : DrivingLicenseDataSourceEnum.values()) {
			if (enumerate.getValue() == value) {
				return enumerate;
			}
		}
		return null;
	}
}
